# app/ai_service.py（AI接口封装）

import requests

class AIService:
    def __init__(self, api_key):
        self.api_key = api_key

    def generate_response(self, prompt):
        # TODO: Implement API request logic
        response = requests.post(
            "https://api.example.com/generate",
            headers={"Authorization": f"Bearer {self.api_key}"},
            json={"prompt": prompt}
        )
        return response.json()
